/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * visualizarUsuario.java
 *
 * Created on Feb 6, 2012, 2:19:11 PM
 */
package gro.procesos.Frames;


import gro.procesos.clases.UsuarioDP;
import gro.utilitarios.FormatoCabecera;
import gro.utilitarios.FormatoTablaUsuario;
import gro.utilitarios.ModeloUsuario;
import java.awt.Toolkit;
import java.net.URL;
import java.util.Iterator;
import java.util.LinkedHashMap;
import javax.swing.JOptionPane;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableColumn;

/**
 *
 * @author Jose
 */
public class VisualizarUsuario extends javax.swing.JDialog {

    LinkedHashMap ht;
    String path = "/gro/imagenes/icoMenu.png";
    URL url = this.getClass().getResource(path);
    ModeloUsuario modelo = new ModeloUsuario();
    UsuarioDP udp = new UsuarioDP();
    String datos = "";
    String contrasena;
    String usuario;
    int bandBoton=0;

    public VisualizarUsuario(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        this.setIconImage(Toolkit.getDefaultToolkit().getImage(url));
        tablaUsuarios.setModel(modelo);
        tablaUsuarios.setDefaultRenderer(String.class, new FormatoTablaUsuario());
        tablaUsuarios.setDefaultRenderer(Integer.class, new FormatoTablaUsuario());
        ht = udp.visualizarTodosUsuarioDP();
        Object obj1;
        cargarTabla();
        Iterator iterator = ht.keySet().iterator();
        while (iterator.hasNext()) {
            obj1 = (String) iterator.next();
            datos = (String) ht.get(obj1);
            udp.separarDatos(datos);
            Object[] fila = {obj1, udp.getUsuario(), udp.getContrasena(), udp.getPermiso()};
            modelo.addRow(fila);
        }
    }

    public void cargarTabla() {

        modelo.addColumn("Código");
        modelo.addColumn("Usuario");
        modelo.addColumn("Contraseña");
        modelo.addColumn("Permisos");
        TableColumn tc1 = tablaUsuarios.getColumn("Código");
        tc1.setPreferredWidth(50);
        TableColumn tc2 = tablaUsuarios.getColumn("Usuario");
        tc2.setPreferredWidth(80);
        TableColumn tc3 = tablaUsuarios.getColumn("Contraseña");
        tc3.setPreferredWidth(80);
        TableColumn tc4 = tablaUsuarios.getColumn("Permisos");
        tc4.setPreferredWidth(40);
        tc1.setResizable(false);
        tc2.setResizable(false);
        tc3.setResizable(false);
        tc4.setResizable(false);
        JTableHeader header = new JTableHeader();
        header = tablaUsuarios.getTableHeader();
        header.setDefaultRenderer(new FormatoCabecera());

    }

    public void cargarDatos() {
        for (int i = tablaUsuarios.getRowCount() - 1; i >= 0; i--) {
            modelo.removeRow(i);
        }
        Object obj1;
        ht = udp.visualizarTodosUsuarioDP();
        Iterator iterator = ht.keySet().iterator();
        while (iterator.hasNext()) {
            obj1 = (String) iterator.next();
            datos = (String) ht.get(obj1);
            udp.separarDatos(datos);
            Object[] fila = {obj1, udp.getUsuario(), udp.getContrasena(), udp.getPermiso()};
            modelo.addRow(fila);
        }

    }

    public void limpiarCampos() {
        txtContrasena.setText("");
        txtUsuario.setText("");
        cbPermisos.setSelectedIndex(-1);
        txtUsuario.setEnabled(true);
        txtContrasena.setEnabled(true);
        cbPermisos.setEnabled(true);
        btnNuevo.setEnabled(true);
        btnGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gro/imagenes/editar.png")));
        bandBoton=0;
        btnGuardar.setEnabled(false);
        btnEliminar.setEnabled(false);
        btnCancelar.setEnabled(false);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lblTitulo = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tablaUsuarios = new javax.swing.JTable();
        lblUsuario = new javax.swing.JLabel();
        lblContrasena = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        txtUsuario = new javax.swing.JTextField();
        txtContrasena = new javax.swing.JPasswordField();
        cbPermisos = new javax.swing.JComboBox();
        btnNuevo = new javax.swing.JButton();
        btnEliminar = new javax.swing.JButton();
        btnGuardar = new javax.swing.JButton();
        btnSalir = new javax.swing.JButton();
        btnCancelar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Sistema Académico Natlog");
        setMinimumSize(new java.awt.Dimension(555, 400));
        setResizable(false);

        lblTitulo.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        lblTitulo.setForeground(new java.awt.Color(51, 153, 0));
        lblTitulo.setText("Manejo de Usuarios");
        lblTitulo.setName("lblTitulo"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        tablaUsuarios.setModel(modelo);
        tablaUsuarios.setName("tablaUsuarios"); // NOI18N
        tablaUsuarios.getTableHeader().setReorderingAllowed(false);
        tablaUsuarios.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tablaUsuariosMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(tablaUsuarios);

        lblUsuario.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblUsuario.setForeground(new java.awt.Color(51, 153, 0));
        lblUsuario.setText("Usuario");
        lblUsuario.setName("lblUsuario"); // NOI18N

        lblContrasena.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblContrasena.setForeground(new java.awt.Color(51, 153, 0));
        lblContrasena.setText("Contraseña");
        lblContrasena.setName("lblContrasena"); // NOI18N

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(51, 153, 0));
        jLabel3.setText("Permisos");
        jLabel3.setName("jLabel3"); // NOI18N

        txtUsuario.setName("txtUsuario"); // NOI18N
        txtUsuario.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtUsuarioKeyTyped(evt);
            }
        });

        txtContrasena.setName("txtContrasena"); // NOI18N
        txtContrasena.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtContrasenaKeyTyped(evt);
            }
        });

        cbPermisos.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Doctor", "Secretaria" }));
        cbPermisos.setName("cbPermisos"); // NOI18N

        btnNuevo.setForeground(new java.awt.Color(0, 102, 152));
        btnNuevo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gro/imagenes/nuevo.png"))); // NOI18N
        btnNuevo.setName("btnNuevo"); // NOI18N
        btnNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNuevoActionPerformed(evt);
            }
        });

        btnEliminar.setForeground(new java.awt.Color(0, 102, 152));
        btnEliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gro/imagenes/eliminar.png"))); // NOI18N
        btnEliminar.setEnabled(false);
        btnEliminar.setName("btnEliminar"); // NOI18N
        btnEliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEliminarActionPerformed(evt);
            }
        });

        btnGuardar.setForeground(new java.awt.Color(0, 102, 152));
        btnGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gro/imagenes/editar.png"))); // NOI18N
        btnGuardar.setEnabled(false);
        btnGuardar.setName("btnGuardar"); // NOI18N
        btnGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarActionPerformed(evt);
            }
        });

        btnSalir.setForeground(new java.awt.Color(0, 102, 152));
        btnSalir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gro/imagenes/regresar.png"))); // NOI18N
        btnSalir.setName("btnSalir"); // NOI18N
        btnSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalirActionPerformed(evt);
            }
        });

        btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gro/imagenes/mnBuscar.png"))); // NOI18N
        btnCancelar.setEnabled(false);
        btnCancelar.setName("btnCancelar"); // NOI18N
        btnCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(30, 30, 30)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(btnNuevo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(btnEliminar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(btnGuardar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(btnSalir, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblContrasena, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(cbPermisos, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(txtUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(txtContrasena, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 435, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(147, 147, 147)
                        .addComponent(lblTitulo)))
                .addContainerGap(18, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblTitulo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel3)
                            .addComponent(cbPermisos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(46, 46, 46))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(37, 37, 37)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lblContrasena)
                                    .addComponent(txtContrasena, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(68, 68, 68))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(btnNuevo)
                                        .addComponent(lblUsuario)
                                        .addComponent(txtUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(11, 11, 11)
                                    .addComponent(btnEliminar))
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(btnGuardar)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(btnSalir))))
                        .addGap(11, 11, 11))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void txtUsuarioKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtUsuarioKeyTyped
    if (txtUsuario.getText().length() >= 80) {
        evt.consume();
    }
}//GEN-LAST:event_txtUsuarioKeyTyped

private void txtContrasenaKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtContrasenaKeyTyped
    contrasena = String.valueOf(txtContrasena.getPassword());
    if (contrasena.length() >= 80) {
        evt.consume();
    }
}//GEN-LAST:event_txtContrasenaKeyTyped

private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNuevoActionPerformed
    contrasena = String.valueOf(txtContrasena.getPassword());
    usuario = txtUsuario.getText();
    if (!(contrasena.trim().isEmpty() || usuario.trim().isEmpty() || cbPermisos.getSelectedIndex() == -1)) {
        udp.setContrasena(contrasena);
        udp.setUsuario(usuario);
        if (cbPermisos.getSelectedIndex() == 0) {
            udp.setPermiso("1");
        } else if (cbPermisos.getSelectedIndex() == 1) {
            udp.setPermiso("2");
        }
        udp.agregarUsuarioDP();
        cargarDatos();
        limpiarCampos();

    } else {
        JOptionPane.showMessageDialog(this, "Todos los campos son obligatorios", "ERROR", JOptionPane.ERROR_MESSAGE);
    }


}//GEN-LAST:event_btnNuevoActionPerformed

private void tablaUsuariosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaUsuariosMouseClicked
    int fila = tablaUsuarios.rowAtPoint(evt.getPoint());
    int columna = tablaUsuarios.columnAtPoint(evt.getPoint());
    if ((fila > -1) && (columna > -1)) {
        udp.setCodigo(Integer.parseInt(modelo.getValueAt(fila, 0).toString()));
        txtUsuario.setText(modelo.getValueAt(fila, 1).toString());
        txtContrasena.setText(modelo.getValueAt(fila, 2).toString());
        cbPermisos.setSelectedItem(modelo.getValueAt(fila, 3).toString());
        btnGuardar.setEnabled(true);
        btnEliminar.setEnabled(true);
        txtUsuario.setEnabled(false);
        txtContrasena.setEnabled(false);
        cbPermisos.setEnabled(false);
        btnNuevo.setEnabled(false);
        btnCancelar.setEnabled(true);
    }

}//GEN-LAST:event_tablaUsuariosMouseClicked

private void btnGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarActionPerformed
    
    if (bandBoton==0) {
        txtUsuario.setEnabled(true);
        txtContrasena.setEnabled(true);
        cbPermisos.setEnabled(true);
        bandBoton=1;
        btnGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gro/imagenes/guardar.png")));
        
    }
    else if (bandBoton==1) {
        contrasena = String.valueOf(txtContrasena.getPassword());
        usuario = txtUsuario.getText();
        if (!(contrasena.trim().isEmpty() || usuario.trim().isEmpty() || cbPermisos.getSelectedIndex() == -1)) {
            udp.setContrasena(contrasena);
            udp.setUsuario(usuario);
            if (cbPermisos.getSelectedIndex() == 0) {
                udp.setPermiso("1");
            } else if (cbPermisos.getSelectedIndex() == 1) {
                udp.setPermiso("2");
            }
            udp.modificarUsuarioDP();
            bandBoton=0;
            cargarDatos();
            limpiarCampos();
        } else {
            JOptionPane.showMessageDialog(this, "Todos los campos son obligatorios", "ERROR", JOptionPane.ERROR_MESSAGE);
        }
    }
}//GEN-LAST:event_btnGuardarActionPerformed

private void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarActionPerformed
    limpiarCampos();
}//GEN-LAST:event_btnCancelarActionPerformed

private void btnEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarActionPerformed
    udp.eliminarUsuarioDP();
    cargarDatos();
    limpiarCampos();
}//GEN-LAST:event_btnEliminarActionPerformed

private void btnSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalirActionPerformed
    this.dispose();
}//GEN-LAST:event_btnSalirActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VisualizarUsuario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VisualizarUsuario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VisualizarUsuario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VisualizarUsuario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                VisualizarUsuario dialog = new VisualizarUsuario(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {

                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCancelar;
    private javax.swing.JButton btnEliminar;
    private javax.swing.JButton btnGuardar;
    private javax.swing.JButton btnNuevo;
    private javax.swing.JButton btnSalir;
    private javax.swing.JComboBox cbPermisos;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblContrasena;
    private javax.swing.JLabel lblTitulo;
    private javax.swing.JLabel lblUsuario;
    private javax.swing.JTable tablaUsuarios;
    private javax.swing.JPasswordField txtContrasena;
    private javax.swing.JTextField txtUsuario;
    // End of variables declaration//GEN-END:variables
}
